import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;

public class test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        System.out.println(twoSum(arr));
    }
    public static boolean twoSum(int[] arr){
        //如果哈希表中找不到那就对啦
        HashMap<Integer,Integer> hashMap = new HashMap<>();//
        hashMap.put(arr[0],1);
        for (int i = 1; i < arr.length; i++) {
            Integer flag = hashMap.get(arr[i]);
            if(flag!=null){
                return true;
            }
            hashMap.put(arr[i],1);
        }
        return false;
    }
}
